package com.lingshi.shopping.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

//项目的全局错枚举
@Getter
@AllArgsConstructor
public enum ErrorEnums {
    SUCCESS(200,"success"),
    NO_LOGIN_ERROR(401,"未登录"),
    LOGIN_ERROR(400,"账号密码错误"),
    SYSTEM_ERROR(500,"系统错误"),
    PHONE_ERROR(600,"手机号格式错误"),
    ADMIN_HAS_ROLE_ERROR(1000,"此角色还有管理员在使用，不能删除"),
    ROLE_HAS_PERMISSION_ERROR(1001,"此权限还有角色在使用，不能删除"),
    GOODS_HAS_BRAND_ERROR(1002,"此品牌还关联有商品，不能删除"),
    PARAMS_ERROR(300,"参数错误" ),
    BRAND_EXISTS_ERROR(1003,"品牌已经存在，换一个" ),
    INSERT_OR_UPDATE_PRODUCT_TYPE_ERROR(1004, "商品分类最多三级分类"),
    PRODUCT_TYPE_HAS_CHILDREN(1005, "该分类还还有子分类，不能删除"),
    PRODUCT_TYPE_HAS_GOODS(1006,"该分类还关联有商品，不能删除" ),
    FILE_UPLOAD_ERROR(1007, "文件上传错误"),
    NO_KEYWORD_ERROR(1008, "抱歉，没有找到与关键词相关的商品"),
    SEND_MESSAGE_ERROR(1009, "发送短信失败"),
    CHECK_CODE_ERROR(1010,"验证码错误或者失效"),
    REGISTER_PHONE_EXISTS_ERROR(1011, "手机号已经存在"),
    REGISTER_USERNAME_EXISTS_ERROR(1012, "账号已经存在"),
    SEND_CODE_FAST_ERROR(1013, "发送过于频繁，请稍后再试"),
    ORDER_PAID_ERROR(1014,"订单已支付" ),
    GOODS_STOCK_ERROR(1015, "商品库存不够了"),
    ORDER_EXPIRE_ERROR(1016, "订单已经过期"),
    FLOW_ERROR(1017,"流量异常" );

    private Integer code;
    private String message;
}
